#!/bin/bash
#
# This script builds the LALRPOP tutorial (using `mdbook build`) and
# then copies the additional sources files that are needed into the
# right places so that e.g. the links to the calculator and so forth
# work correctly.

ROOT=$(dirname "$(dirname "$0")")

set -e

cd "$ROOT/doc"
mdbook build
cp -rf calculator pascal whitespace book/html
echo "Book has been built into $PWD/book/html"
echo "To view, open $PWD/book/html/index.html"
